@import 'normalize/normalize';

@headerH: 50px;
@gap: 10px;

html, body, p, input {
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
    font-size: 12px;
    background: #fff;
}

html, body {
    background: #fbf8fb;
}

a {
    text-decoration: none;
}

.container {
    margin: 0 auto;
    width: 6.4rem;
    .banner {
        width: 6.4rem;
        height: .65rem;
        background: url(/images/banner.jpg) no-repeat top center;
        background-size: 100% auto;
        p {
            height: .65rem;
            line-height: .65rem;
            text-align: center;
            font-size: .3rem;
            font-weight: bold;
            color: #fff;
        }
    }
}

.wrapForLeaveMessage {
    .subTitle {
        padding: .2rem 0 .3rem;
        font-size: .2rem;
        color: #9e9e9e;
        text-align: center;
    }
    .leaveMessage {
        margin: 0 .3rem;
        padding: .2rem;

        border: 1px solid #e3e1e4;
        background: #fff;
        border-radius: 15px;
        overflow: hidden;
        .inputBox {
            margin: .1rem;
            padding: .1rem;
            height: .6rem;
            border-bottom: 1px solid #f1f0f1;
            label {
                display: inline-block;
                line-height: .6rem;
                font-size: .24rem;
            }
            input {
                display: inline-block;
                outline: none;
                border: none;
                line-height: .6rem;
                font-size: .24rem;
            }
        }
        .textBox {
            margin: .1rem;
            padding: .1rem;
            label {
                display: block;
                line-height: .6rem;
                font-size: .24rem;
            }
            textarea {
                resize: none;
                outline: none;
                display: block;
                width: 100%;
                border: 1px solid #f1f0f1;
                line-height: 2;
                font-size: .24rem;
            }
        }
        .submit {
            a {
                margin: .5rem auto 0;
                display: block;
                width: 75%;
                height: .6rem;
                border-radius: 6px;
                text-align: center;
                line-height: .6rem;
                font-size: .3rem;
                color: #fff;
                background: #af0c0c;
            }
        }
        .warning {
            padding: .1rem 0;
            text-align: center;
            font-size: .2rem;
            color: #d80909;
        }
        .off {
            display: none;
        }
    }
}

.chat {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: .65rem;
    bottom: 0;
    width: 6.4rem;
    overflow: hidden;
    .messagesBox {
        width: 6.4rem;
        flex-grow: 1;
        overflow: hidden;
        -webkit-transform: translate3d(0, 0, 0);
        ul{
            padding-bottom:5px;
        }
        .message {
            margin: 10px 20px;
            &:after{
                content:'';
                display:block;
                clear:both;
            }
            .content {
                max-width:80%;
                height:auto;
                padding: 5px;
                border: 1px solid;
                border-radius: 5px;
                font-size: .24rem;
                word-wrap:break-word;
                line-height: .4rem;
            }
            &.belong {
                .content {
                    position:relative;
                    float: right;
                    border-color: #eac0c2;
                    background: #fff5ad;
                }
                .out {
                    position: absolute;
                    right:-20px;
                    top:50%;
                    margin-top:-10px;
                    content: '';
                    border: 10px solid transparent;
                    border-left-color: #eac0c2;
                }
                .in {
                    position: absolute;
                    right:-19px;
                    top:50%;
                    margin-top:-10px;
                    content: '';
                    border: 10px solid transparent;
                    border-left-color: #fff5ad;
                }
            }
            &.admin {
                .content {
                    position:relative;
                    float: left;
                    border-color: #cd7b7e;
                    background: #fe9b9f;
                }
                .out {
                    position: absolute;
                    left:-20px;
                    top:50%;
                    margin-top:-10px;
                    content: '';
                    border: 10px solid transparent;
                    border-right-color: #cd7b7e;
                }
                .in {
                    position: absolute;
                    left:-19px;
                    top:50%;
                    margin-top:-10px;
                    content: '';
                    border: 10px solid transparent;
                    border-right-color: #fe9b9f;
                }
            }
            &.autoReplay {
                .content {
                    margin: 0 auto;
                    border-color: #cd7b7e;
                    text-align: center;
                    background: #fe9b9f;
                }
            }
        }
    }
    .chatInputBox {
        @heightO: 50px;
        @heightI: 40px;
        display: flex;
        width: 6.4rem;
        justify-content: space-around;
        align-items: center;
        height: @heightO;
        min-height: @heightO;
        border-top: 1px solid #e8e8e8;
        background: #fff;
        input {
            display: block;
            outline: none;
            width: 5rem;
            height: @heightI;
            font-size: 15px;
            line-height: @heightI;
            border: 1px solid #e0e0e0;
            border-radius: 5px;
            background: #ececec;
        }
        .btn {
            display: block;
            width: 1rem;
            height: @heightI;
            font-size: 15px;
            line-height: @heightI;
            font-weight: bold;
            text-align: center;
        }
    }
}


